
# Table of Contents

1.  [lilu-dmenu](#orgbbe2444)
    1.  [Usage](#org4ebd6c7)
    2.  [Installation](#org170600a)
    3.  [Author](#orgcb2bb48)
    4.  [Licence](#org56c6e69)
    5.  [Copyright](#org1aa5b6e)
    6.  [ToDo](#org657704c)


<a id="orgbbe2444"></a>

# lilu-dmenu

Call dmenu/rofi program from Common Lisp


<a id="org4ebd6c7"></a>

## Usage

    (dynamic-menu "select a number" '(1 2 3 4 5)
                  :item-fn #'(lambda (x) (format nil "~r" x)))

    (multiple-value-bind (sel match-p)
        (dynamic-menu "select a number" '(1 2 3 4 5)
                      :item-fn #'(lambda (x) (format nil "~r" x)))
      (format t "Selection: ~A (~A) ~%" sel (if match-p "matched" "unmatched")))

    (let ((*dmenu* :rofi))
      (multiple-value-bind (sel match-p)
          (dynamic-menu "select a number" '(1 2 3 4 5)
                        :item-fn #'(lambda (x) (format nil "~r" x)))
        (format t "Selection: ~A (~A) ~%" sel (if match-p "matched" "unmatched"))))

    (multiple-value-bind (sel match-p)
        (dmenu "select a number" '(1 2 3 4 5)
               :item-fn #'(lambda (x) (format nil "~r" x)))
      (format t "Selection: ~A (~A) ~%" sel (if match-p "matched" "unmatched")))

    (multiple-value-bind (sel match-p)
        (rofi "select a number" '(1 2 3 4 5)
              :item-fn #'(lambda (x) (format nil "~r" x)))
      (format t "Selection: ~A (~A) ~%" sel (if match-p "matched" "unmatched")))

The default theme:

    lilu-dmenu:*dmenu-theme*
    lilu-dmenu:*rofi-theme*

To use a different theme:

    (let ((*dmenu-theme* (append '((:bg . "#ff0000")
                                   (:fg . "#00ff00")) *dmenu-theme*)))
      (dmenu "select a number" '(1 2 3 4 5)
             :item-fn #'(lambda (x) (format nil "~r" x))))


<a id="org170600a"></a>

## Installation

Clone the project into local-projects of quicklisp, then

    (ql:quickload :lilu-dmenu)


<a id="orgcb2bb48"></a>

## Author

-   Alessandro Serra


<a id="org56c6e69"></a>

## Licence

[CC0](https://tldrlegal.com/license/creative-commons-cc0-1.0-universal)


<a id="org1aa5b6e"></a>

## Copyright

Copyright (c) 2019,2021 Alessandro Serra


<a id="org657704c"></a>

## ToDo

